package com.sikaryofficial.information.controller;

import com.sikaryofficial.common.core.domain.R;
import com.sikaryofficial.common.core.web.controller.BaseController;
import com.sikaryofficial.information.domain.dto.req.ArticleExposureCountReq;
import com.sikaryofficial.information.manager.ArticleExposureManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 文章曝光次数统计Controller
 *
 * @author qinjinyuan
 * @date 2024-04-24
 */
@RestController
@RequestMapping("/articleExposureCount")
@Api(tags = "文章曝光次数统计服务")
public class ArticleExposureCountController extends BaseController {
    @Autowired
    private ArticleExposureManager exposureManager;
    /**
     * 新增文章曝光次数统计
     */
    @PostMapping("/save")
    @ApiOperation("文章曝光次数统计保存")
    public R<Boolean> add(@Validated @RequestBody ArticleExposureCountReq req) {
        return R.ok(exposureManager.saveData(req));
    }
}
